<div class="panel-admin">
	<div>					
		<h1>เพิ่มบทความ</h1>
		<p>เพิ่มบทความใหม่ทั้งหมด</p>				
	</div>
	<div class="panel-admin-inner">
		<div class="navbar">
			<div class="navbar-inner text-right">		
				<button class="btn btn-primary" onclick="document['frm_article_add'].submit()">บันทึก</button>	
			</div>
		</div>  
		<form class="form-horizontal" name="frm_article_add" action="<?php print base_url(); ?>admin/article/add/submit" method="post" enctype="multipart/form-data">
			<div class="line-space">
				<label>ชื่อบทความ</label>		
				<input type="text" name="at" class="input-xxlarge">
			</div>	
			<div class="line-space row-fluid">				
				<div class="span8">
					<label>หมวดหมู่</label>
					<?php print form_dropdown('acat', $category); ?>
				</div>				
			</div>			
			<div class="line-space">
				<label>รายละเอียด</label>
				<textarea name="ac" rows="15" cols="100" class="editor input-block-level"></textarea>
			</div>
			<div class="line-space">
				<label>ป้ายกำกับ</label>
				<input type="text" name="atag" class="input-xxlarge" />	
			</div>
			<div class="line-space">
				<div class="btn-group" data-toggle="buttons-checkbox" >					
					<button class="btn" data-name="Choice1,0">Feature</button>				
					<input type="checkbox" class="btn" data-name="Choice2,0">Published</input>				    		    
				</div>	
			</div>		
			<div class="line-space">
				<label>รูปภาพบทความ</label>				
				<div class="fileupload fileupload-new" data-provides="fileupload">
					<div>
						<span class="btn btn-file">
							<span class="fileupload-new">Select image</span>
							<span class="fileupload-exists">Change</span>
							<input type="file" name="athumb" accept="image/png,image/jpg" />
						</span>
						<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>								
					</div>
					<div class="fileupload-preview thumbnail" style="width: 150px; height: 100px;"></div>					
				</div>				
			</div>
			
		</form>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$('textarea.editor').tinymce({
			// Location of TinyMCE script
			script_url : 'js/tiny_mce/tiny_mce.js',

			// General options
			theme : "advanced",
			plugins : "imagemanager,filemanager,autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",			
			skin: "bootstrap",			

			// Theme options
			theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|link,unlink,anchor,image,|forecolor,backcolor",			
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : false,

			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js"
		});
	});	
	
</script>

